.class public final Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;
.super Ljava/lang/Object;
.source "CookieHolderWrapper.java"


# instance fields
.field private final mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

.field private mExpirationTime:J


# direct methods
.method constructor <init>(Lcom/burstly/lib/network/beans/cookie/CookieHolder;)V
    .locals 2
    .parameter "cookie"

    .prologue
    .line 52
    invoke-virtual {p1}, Lcom/burstly/lib/network/beans/cookie/CookieHolder;->getMaxage()Ljava/lang/Integer;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    int-to-long v0, v0

    invoke-static {v0, v1}, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->extendLifetime(J)J

    move-result-wide v0

    invoke-direct {p0, p1, v0, v1}, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;-><init>(Lcom/burstly/lib/network/beans/cookie/CookieHolder;J)V

    .line 53
    return-void
.end method

.method constructor <init>(Lcom/burstly/lib/network/beans/cookie/CookieHolder;J)V
    .locals 0
    .parameter "cookie"
    .parameter "expires"

    .prologue
    .line 41
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 42
    iput-object p1, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    .line 43
    iput-wide p2, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mExpirationTime:J

    .line 44
    return-void
.end method

.method private static extendLifetime(J)J
    .locals 4
    .parameter "maxAge"

    .prologue
    .line 63
    const-wide/16 v0, 0x3e8

    mul-long/2addr v0, p0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    add-long/2addr v0, v2

    return-wide v0
.end method


# virtual methods
.method public equals(Ljava/lang/Object;)Z
    .locals 5
    .parameter "obj"

    .prologue
    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 112
    if-ne p0, p1, :cond_1

    .line 129
    :cond_0
    :goto_0
    return v1

    .line 115
    :cond_1
    if-nez p1, :cond_2

    move v1, v2

    .line 116
    goto :goto_0

    .line 118
    :cond_2
    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v3

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v4

    if-eq v3, v4, :cond_3

    move v1, v2

    .line 119
    goto :goto_0

    :cond_3
    move-object v0, p1

    .line 121
    check-cast v0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;

    .line 122
    .local v0, other:Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;
    iget-object v3, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    if-nez v3, :cond_4

    .line 123
    iget-object v3, v0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    if-eqz v3, :cond_0

    move v1, v2

    .line 124
    goto :goto_0

    .line 126
    :cond_4
    iget-object v3, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    iget-object v4, v0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    invoke-virtual {v3, v4}, Lcom/burstly/lib/network/beans/cookie/CookieHolder;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_0

    move v1, v2

    .line 127
    goto :goto_0
.end method

.method public getCookie()Lcom/burstly/lib/network/beans/cookie/CookieHolder;
    .locals 1

    .prologue
    .line 72
    iget-object v0, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    return-object v0
.end method

.method public getExpirationTime()J
    .locals 2

    .prologue
    .line 81
    iget-wide v0, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mExpirationTime:J

    return-wide v0
.end method

.method public hashCode()I
    .locals 3

    .prologue
    .line 100
    const/16 v0, 0x1f

    .line 101
    .local v0, prime:I
    const/4 v1, 0x1

    .line 102
    .local v1, result:I
    iget-object v2, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    if-nez v2, :cond_0

    const/4 v2, 0x0

    :goto_0
    add-int/lit8 v1, v2, 0x1f

    .line 103
    return v1

    .line 102
    :cond_0
    iget-object v2, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/cookie/CookieHolder;->hashCode()I

    move-result v2

    goto :goto_0
.end method

.method setNewMaxAge(I)V
    .locals 2
    .parameter "maxAge"

    .prologue
    .line 90
    iget-object v0, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/burstly/lib/network/beans/cookie/CookieHolder;->setMaxage(Ljava/lang/Integer;)V

    .line 91
    int-to-long v0, p1

    invoke-static {v0, v1}, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->extendLifetime(J)J

    move-result-wide v0

    iput-wide v0, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mExpirationTime:J

    .line 92
    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 4

    .prologue
    .line 134
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "CookieHolderWrapper [cookie="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mCookie:Lcom/burstly/lib/network/beans/cookie/CookieHolder;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ", expirationTime="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    new-instance v1, Ljava/util/Date;

    iget-wide v2, p0, Lcom/burstly/lib/network/beans/cookie/CookieHolderWrapper;->mExpirationTime:J

    invoke-direct {v1, v2, v3}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "]"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
